/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 */

#ifndef __TSIN_LIBRARY_DYNAMICCOUNTER_HPP__
#define __TSIN_LIBRARY_DYNAMICCOUNTER_HPP__

#include <tsin/library/common.hpp>
#include <tsin/library/DynamicObject.hpp>

namespace tsin {

        class LIBRARY_DLLEXPORT DynamicCounter : public DynamicObject {
        public:
                DynamicCounter();

                void init(float start, float end = 0.0f,
                          float step = 0.0f);
                virtual void reinit();
                virtual DynamicEvent postTick(void *data = 0, void *priv_data = 0);

                virtual char getDescriptor();
                virtual int getInt();
                virtual float getFloat();

        private:
                float current;
                float start, step, end;
        };

}

#endif /* __TSIN_LIBRARY_DYNAMICCOUNTER_HPP__ */
